package com.fzhucc.modules.subject.repository;

import com.fzhucc.modules.subject.domain.entity.SubjectHighfieldsType3;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import javax.annotation.Nullable;
import java.util.List;

/**
* @website https://fzhucc.com
* @author yyg
* @since 2022-09-26 00:00:00
**/
public interface SubjectHighfieldsType3Repository extends JpaRepository<SubjectHighfieldsType3, Integer>, JpaSpecificationExecutor<SubjectHighfieldsType3> {
    @Nullable
    @Query("SELECT o from SubjectHighfieldsType3 as o where o.highfields2=:highfields2 and o.type=:type order by o.sort")
    List<SubjectHighfieldsType3> findByHighfields2(String highfields2,String type);

    @Nullable
    @Query("SELECT o from SubjectHighfieldsType3 as o where o.highfields2=:highfields2 and o.highfields3=:highfields3 and o.type=:type order by o.sort")
    List<SubjectHighfieldsType3> findByHighfields2With3(String highfields2,String type,String highfields3);
}